import { defineStore } from 'pinia'
import { ElMessage } from "element-plus";
import { getInfo } from "../api/info.js";
export const userStore = defineStore('main', {
    state() {
        return {
            menuShow:true,
            username: '张三',
            group: '',
            department: {}
        }
    },
    actions: {
        change(){
            this.menuShow = false
        },
    },
    persist: {
        enabled: true,
        strategies: [
            {
                storage: localStorage,
                paths: ['info', 'id']
            }
        ]
    }
})